package pojo;

public class OrderInfo {
    private String partNumber;       // 零件编号
    private String partName;         // 零件名称
    private int orderQuantity;       // 订货数量
    private double currentPrice;     // 当前价格
    private String mainSupplier;     // 主要供应者
    private String timesSupplier;    // 次要供应者

    // 构造方法
    public OrderInfo(String partNumber, String partName, int orderQuantity, double currentPrice, String mainSupplier, String timesSupplier) {
        this.partNumber = partNumber;
        this.partName = partName;
        this.orderQuantity = orderQuantity;
        this.currentPrice = currentPrice;
        this.mainSupplier = mainSupplier;
        this.timesSupplier = timesSupplier;
    }

    // Getters 和 Setters
    public String getPartNumber() {
        return partNumber;
    }

    public void setPartNumber(String partNumber) {
        this.partNumber = partNumber;
    }

    public String getPartName() {
        return partName;
    }

    public void setPartName(String partName) {
        this.partName = partName;
    }

    public int getOrderQuantity() {
        return orderQuantity;
    }

    public void setOrderQuantity(int orderQuantity) {
        this.orderQuantity = orderQuantity;
    }

    public double getCurrentPrice() {
        return currentPrice;
    }

    public void setCurrentPrice(double currentPrice) {
        this.currentPrice = currentPrice;
    }

    public String getMainSupplier() {
        return mainSupplier;
    }

    public void setMainSupplier(String mainSupplier) {
        this.mainSupplier = mainSupplier;
    }

    public String getTimesSupplier() {
        return timesSupplier;
    }

    public void setTimesSupplier(String timesSupplier) {
        this.timesSupplier = timesSupplier;
    }

    //重写一下ToString方法，前面的描述用中文
    @Override
    public String toString() {
        return "零件编号：" + partNumber +
                ", 零件名称：" + partName +
                ", 订货数量：" + orderQuantity +
                ", 当前价格：" + currentPrice +
                ", 主要供应者：" + mainSupplier +
                ", 次要供应者：" + timesSupplier;
    }
}